projects
/
project
/
bcm63xx
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
21d0043
)
dm: Protect device_unbind() with CONFIG_DM_DEVICE_REMOVE
author
Marek Vasut
<
[email protected]
>
Wed, 18 Feb 2015 21:36:18 +0000
(22:36 +0100)
committer
Simon Glass
<
[email protected]
>
Thu, 19 Feb 2015 14:30:31 +0000
(07:30 -0700)
Since device_unbind() is also defined in device-remove.c,
which is compiled in only in case CONFIG_DM_DEVICE_REMOVE
is defined, protect the device_unbind() prototype with the
same CONFIG_DM_DEVICE_REMOVE check.
Signed-off-by: Marek Vasut <
[email protected]
>
Cc: Simon Glass <
[email protected]
>
Cc: Stefan Roese <
[email protected]
>
Cc: Tom Rini <
[email protected]
>
Acked-by: Simon Glass <
[email protected]
>
include/dm/device-internal.h
patch
|
blob
|
history
diff --git
a/include/dm/device-internal.h
b/include/dm/device-internal.h
index f0cc7947505176907677840bd47554b8a22973c6..e2418fedb976deb9d57ed13a350a26d9ab7190eb 100644
(file)
--- a/
include/dm/device-internal.h
+++ b/
include/dm/device-internal.h
@@
-101,7
+101,11
@@
static inline int device_remove(struct udevice *dev) { return 0; }
* @dev: Pointer to device to unbind
* @return 0 if OK, -ve on error
*/
+#ifdef CONFIG_DM_DEVICE_REMOVE
int device_unbind(struct udevice *dev);
+#else
+static inline int device_unbind(struct udevice *dev) { return 0; }
+#endif
#ifdef CONFIG_DM_DEVICE_REMOVE
void device_free(struct udevice *dev);